package com.sxt.domain;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 文件实体类
 * @TableName file
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "file_ms.file")
public class File implements Serializable {
    /**
     * 文件ID
     */
    @TableId(value = "file_id", type = IdType.AUTO)
    private Integer fileId;

    /**
     * 原文件名
     */
    @TableField(value = "old_name")
    private String oldName;

    /**
     * 文件大小
     */
    @TableField(value = "file_size")
    private String fileSize;

    /**
     * 文件类型
     */
    @TableField(value = "file_type")
    private String fileType;

    /**
     * 文件路径
     */
    @TableField(value = "file_path")
    private String filePath;

    /**
     * 文件夹ID
     */
    @TableField(value = "folder_id")
    private Integer folderId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 上传时间
     */
    @TableField(value = "upload_time")
    private Date uploadTime;

    /**
     * 所属文件夹
     */
    @TableField(exist = false) // 表示该属性不为数据库表字段，但又是必须使用的。
    private String folderName;

    private static final long serialVersionUID = 1L;

    public static final String COL_FILE_ID = "file_id";

    public static final String COL_OLD_NAME = "old_name";

    public static final String COL_FILE_SIZE = "file_size";

    public static final String COL_FILE_TYPE = "file_type";

    public static final String COL_FILE_PATH = "file_path";

    public static final String COL_FOLDER_ID = "folder_id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_UPLOAD_TIME = "upload_time";
}